#ifndef YOOHOO_XMPPCORE_SESSIONNEGOTIANT_H
#define YOOHOO_XMPPCORE_SESSIONNEGOTIANT_H

#include "xmppcore/negotiant.h"
#include "xmppcore/xmppparsingfactory.h"

namespace yoohoo_xmppcore {

class SessionParsingFactory : public XmppParsingFactory {
public:
	SessionParsingFactory();
};

class SessionNegotiant : public Negotiant {
	Q_OBJECT
public:
	enum SessionEstablishmentError {
		InternalServerError,
		ForbiddenError,
		ConflictError
	};
	SessionNegotiant(Connector* connector, QObject* parent = 0);
	void negotiate();

signals:
	void success();
	void sessionEstablishmentError(SessionEstablishmentError error);

protected slots:
	void connectorReceived(QString xml);

private:
	XmppParsingFactory* parsingFactory() const;

private:
	QString _iqId;
};

}

#endif
